$(function(){

 	//点击编辑按钮显示窗口
	$("#addAccount").click(function(){
		$("#addAccount_win").window("open");
	});
	 	$('#dg').datagrid({    
	 		 url:'SalaryAccounttable', //数据源地址
		    columns:[[    
		    	{field:'number',fixed:false,width:213,title:'账套编号'},    
		        {field:'names',fixed:false,width:213,title:'账套名称'},    
		        {field:'bumen',fixed:false,width:213,title:'部门'},
		        {field:'shenpiren',fixed:false,width:213,title:'审批人'},
		        {field:'dates',fixed:false,width:213,title:'创建时间'} ,
		        {field:'caozuo',fixed:false,width:213,formatter:operate_formatter,title:'操作'} 
		        
				    
		    ]],
		    toolbar:'#dg',
		    pagination:true,
		    pageNumber:1,
		    pageSize:5,
		    pageList:[5,10,15] 
		}); 
	 	//在每个操作列里面添加编辑，查看，明细，删除
		function operate_formatter(value, row, index) {
	        return "<a href='#' class='easyui-linkbutton'>编辑</a>/\
	        <a href='#' class='easyui-linkbutton'>查看</a>/\
	        <a href='#' class='easyui-linkbutton'>删除</a> ";
	    }
		$('#addAccount_xiangmutable').datagrid({    
	 		 url:'addAccount_xiangmutable', //数据源地址
		    columns:[[    
		    	{field:'xiangmuname',fixed:false,width:213,title:'项目名称'},    
		        {field:'xiangmujine',fixed:false,width:213,title:'项目金额'},    
		    ]],
		    toolbar:'#addAccount_xiangmutable',
		    pagination:true,
		    pageNumber:1,
		    pageSize:5,
		    pageList:[5,10,15]    
		});
	 	//在每个操作列里面添加编辑，查看，明细，删除
		function operate_formatter(value, row, index) {
	        return "<a href='#' class='easyui-linkbutton'>编辑</a>/\
	        <a href='#' class='easyui-linkbutton'>查看</a>/\
	        <a href='#' class='easyui-linkbutton'>删除</a> ";
	    }
	 	//点击编辑按钮显示窗口
		$("#addAccount").click(function(){
			$("#addAccount_win").window("open");
		});
}); 